﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ShoppingCart.aspx.cs" Inherits="ShoppingCart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="register" align="center">
    <asp:GridView ID="gvCart" runat="server" AutoGenerateColumns="False" 
        onrowdeleting="gvCart_RowDeleting" onrowediting="gvCart_RowEditing" 
        onrowupdating="gvCart_RowUpdating">
        <Columns>
            <asp:BoundField DataField="ProductID" HeaderText="ProductID" ReadOnly="True" 
                SortExpression="ProductID" Visible="True" />
            <asp:BoundField DataField="Name" HeaderText="Product's Name" ReadOnly="True" />
            <asp:BoundField DataField="Price"  
                HeaderText="Price" ReadOnly="True" />
            <asp:BoundField DataField="Quantity" HeaderText="Quantity" />
            <asp:BoundField DataField="Cost" HeaderText="Cost" ReadOnly="True" 
                SortExpression="Cost" />
            <asp:CommandField HeaderText="Edit" ShowEditButton="True" ShowHeader="True" />
            <asp:CommandField HeaderText="Delete" ShowDeleteButton="True" 
                ShowHeader="True" />
                
        </Columns>
       
        <EmptyDataTemplate>
          Your shopping cart is empty. Add new product ? <a href="Default.aspx">Yes</a>
        </EmptyDataTemplate>
        
    </asp:GridView>
    
    Total Items: 
    <asp:Label ID="Label5" runat="server" Text="0"></asp:Label>
    <br />
    Total Cost: 
    <asp:Label ID="Label4" runat="server" Text="0" CssClass="cash"></asp:Label><br />
    <asp:Button ID="btnCont" runat="server" CommandName="Cont" 
        Text="Continues shopping" onclick="btnCont_Click" />
    <asp:Button ID="btnCheckOut" runat="server" CommandName="CheckOut" 
        Text="Check Out" onclick="btnCheckOut_Click" />   
        </div>  
</asp:Content>

